import request from '@/utils/request'
// 车型列表vehicleModelApi 
export function getModelData(query) {
  return request({
    url: '/car/carModel/list',
    method: 'get',
    params: query
  })
}

// 查询品牌名称组
export function getBrandName(query) {
  return request({
    url: '/car/carBrand/getBrandName',
    method: 'get',
    params: query
  })
}
// 根据品牌id查询车系名称组
export function getSeriesName(query) {
  return request({
    url: `/car/carSeries/getSeriesName/${query}`,
    method: 'get',
    // params: query
  })
}
// 根据车系名称组查车型
export function getModelName(query) {
  return request({
    url: `/car/carModel/getModelName/${query}`,
    method: 'get',
    // params: query
  })
}

// 车系组

export function getSeriesGroupList(query) {
  return request({
    url: '/car/carSeriesGroup/list',
    method: 'get',
    params: query
  })
}
// http://localhost/dev-api/新增车辆基础信息
export function carBrandAdd(data) {
  return request({
    url: '/car/carModel',
    method: 'post',
    data: data
  })
}


// 编辑
export function updateCar(data) {
  return request({
    url: '/car/carModel',
    method: 'put',
    data: data
  })
}
// 查询详细 http://localhost/dev-api/car/carBasic/1
export function getCarBasic(id) {
  return request({
    url: '/car/carModel/' + id,
    method: 'get'
  })
}


// 删除
export function delModel(id) {
  return request({
    url: '/car/carModel/' + id,
    method: 'delete'
  })
}

// http://localhost/dev-api/car/carBrand/export
// 查询查博士品牌列表
export function getBrandList() {
  return request({
    url: `/car/carModel/getCbsBrandList`,
    method: 'get'
  })
}

// 查询查博士车系列表
export function getVehicleTypeList(query) {
  return request({
    url: `/car/carModel/getCbsSeriesList`,
    method: 'get',
    params: query
  })
}
// 查询查博士车型列表
export function getSeriesList(query) {
  return request({
    url: `/car/carModel/getCbsModelList`,
    method: 'get',
    params: query
  })
}
// 同步查博士车型
export function syncCbsCarModel(data) {
  return request({
    url: `/car/carModel/syncCbsCarModel`,
    method: 'post',
    data: data
  })
}
